<?php

include_once '/var/www/html/new/com.inc.php';
$ac=$GLOBALS['_ac'];
$pw=$GLOBALS['_pw'];
$s = new SoapClient(null,array("location" => "http://localhost/open/openService/pft_insideMX.php","uri" => "www.16u.com?ac_16u=$ac|pw_16u=$pw|auth_16u=true"));

$sql="select l.id as lid,l.title as ltitle,t.id as tid,t.title as ttitle from uu_land l left join uu_jq_ticket t on t.landid=l.id";
// $sql="select l.id as lid,l.title as ltitle,t.id as tid,t.title as ttitle from uu_land l left join uu_jq_ticket t on t.landid=l.id where l.title='好汉坡温泉'";
$GLOBALS['le']->query($sql);
while($row=$GLOBALS['le']->fetch_assoc()){
    $lists[]=$row;
}
//print_r($lists);
$btime1=date("Y-m-d",strtotime("-1 day"));
// $res=$s->Order_Globle_Search("", "", $lists[0]['lid'], $lists[0]['tid'], "", "", $btime1, "", "", "", "", "", "", "", "", "", "", "", 1, 1, "0", "1", 2, "0", "", "0", "", "0", "", "", "", "0", "0","0");
// echo $res;
$ticketnum=array();
foreach($lists as $list){
    $res=$s->Order_Globle_Search("", "", $list['lid'], $list['tid'], "", "", $btime1, "", "", "", "", "", "", "", "", "", "", "", 1, 1, "0", "1", 2, "0", "", "0", "", "0", "", "", "", "0", "0", "0");
    $num=explode(',',$res);
    $ticketnum[$list['lid']][$list['tid']]=$num[1];
    }
print_r($ticketnum);
?>